package com.ruoyi.system.domain;

import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.system.anno.SnowflakeId;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 库存记录对象 wms_inventory_history
 *
 * @author ruoyi
 * @date 2025-06-21
 */
@Data
public class WmsInventoryHistory extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    @SnowflakeId
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;

    /** 订单id */
    @ExcelProperty(value = "订单id")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long operationId;

    /** 订单编号 */
    @ExcelProperty(value = "订单编号")
    private String operationNo;

    /** 操作类型-
入库：1
出库：2
移库：3
盘库：4 */
    @ExcelProperty(value = "操作类型")
    private String operationType;

    /** 商品id */
    @ExcelProperty(value = "商品id")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long productId;

    /** 数量 */
    @ExcelProperty(value = "数量")
    private Long totalQuantity;

    /** 合计金额 */
    @ExcelProperty(value = "合计金额")
    private BigDecimal totalAmount;

    /** 生产日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ExcelProperty(value = "生产日期")
    private Date productionTime;

    /** 过期日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ExcelProperty(value = "过期日期")
    private Date expirationTime;

    private String productCode;

    private String productName;

    private String productSpec;

    private String productUnit;

    private BigDecimal unitPrice;

    private Long outboundTotal;

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long inboundId;

    private String inboundOrderNo;

    private int totalQuantityMax;

    /**
     * 实际库存数量
     */
    private int realTotalQuantity;



    /** 仓库id */
    private Long warehouseId;

    /** 库区id */
    private Long warehouseAreaId;

    /** 货架id */
    private Long warehouseRackId;

    /** 货位id */
    private Long warehouseLocationId;


}
